from django.contrib import admin
from django.urls import path,include
from . import views
from rest_framework.routers import SimpleRouter
router = SimpleRouter()
# user/login 的post请求
router.register('mobile',views.MobileView,'mobile')
router.register('',views.LoginView,'user')

# api/v1/user/register/--->post请求
router.register('register',views.RegisterView,'register')
urlpatterns = [
    # path('admin/', admin.site.urls),
    path('mobile_login/', views.LoginView.as_view({'post':'mobile_login'})),
    path('sms/', views.LoginView.as_view({'get':'send_sms'})),
]
urlpatterns += router.urls
